package day1031_3;

import java.util.Scanner;//1.
//1.输入变量x的值
//2.如果x<0， 就将x+1赋值给变量y
public class SCB5 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);//2.
        System.out.println("请输入变量x的值：");
        int x=sc.nextInt();
        int y=-100;
        if(x<0){
            y=x+1;
        }else if(0<=x && x<10){
            y=x*x+5;
        }
        System.out.println("y变量的值为：" + y);
    }
}


